let doubleFlip zt = flip (flip zt)

let rec flip zt = match zt with
    | Leaf[a]       -> Leaf[a]
    | Branch[xt,yt] -> Branch[(flip yt),(flip xt)]
